package com.chenglai.pay.feign;

import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * 类描述：
 *
 * @Author rxh
 * @Date 2023/11/28 11:01
 */
@Component
public class SeckillFallback implements FallbackFactory<SeckillService> {
    @Override
    public SeckillService create(Throwable cause) {
        return new SeckillService() {
            @Override
            public void groupOnLogic(Map<String, Object> map) {
                System.out.println("seckill服务发生异常");
            }
        };
    }
}
